@include("system::admin.layouts._header")
<body>
<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form" method="post">
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title">
                <li class="layui-this">基本信息</li>
                <li>商品信息</li>
                <li>收货信息</li>
                <li>物流信息</li>
                <li>支付信息</li>
            </ul>

            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">

                    <table class="layui-table">
                        <tbody>
                        <tr>
                            <td>下单用户</td>
                            <td>{{$order->user->name}}</td>
                        </tr>
                        <tr>
                            <td>订单号</td>
                            <td>{{$order->order_sn}}</td>
                        </tr>
                        <tr>
                            <td>订单总额</td>
                            <td>{{$order->order_amount}}</td>
                        </tr>
                        <tr>
                            <td>商品总额</td>
                            <td>{{$order->goods_money}}</td>
                        </tr>
                        <tr>
                            <td>订单状态</td>
                            <td>{{order_status_text($order->order_status)}}</td>
                        </tr>
                        <tr>
                            <td>创建时间</td>
                            <td>{{$order->created_at}}</td>
                        </tr>
                        <tr>
                            <td>更新时间</td>
                            <td>{{$order->updated_at}}</td>
                        </tr>
                        <tr>
                            <td>订单备注</td>
                            <td>{{$order->remark}}</td>
                        </tr>
                        </tbody>
                    </table>

                </div>
                <div class="layui-tab-item">

                    <table class="layui-table">
                        <colgroup>
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <thead>
                        <tr>
                            <th>商品ID</th>
                            <th>商品名称</th>
                            <th>下单单价</th>
                            <th>下单数量</th>
                            <th>下单总额</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($order->goods as $goods)
                        <tr>
                            <td>{{$goods->goods_id}}</td>
                            <td>{{$goods->goods_name}}</td>
                            <td>{{$goods->shop_price}}</td>
                            <td>{{$goods->number}}</td>
                            <td>{{$goods->goods_money}}</td>
                        </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>

                <div class="layui-tab-item">

                    <table class="layui-table">
                        <tbody>
                        <tr>
                            <td>收货人</td>
                            <td>{{$order->receive_name}}</td>
                        </tr>
                        <tr>
                            <td>联系电话</td>
                            <td>{{$order->receive_telephone}}</td>
                        </tr>
                        <tr>
                            <td>省/市/县</td>
                            <td>{{$order->province->name}} {{$order->city->name}} {{$order->district->name}}</td>
                        </tr>
                        <tr>
                            <td>详细地址</td>
                            <td>{{$order->receive_address}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="layui-tab-item">

                    <table class="layui-table">
                        <tbody>
                        <tr>
                            <td>发货状态</td>
                            <td>{{delivery_status_text($order->delivery_status)}}</td>
                        </tr>
                        <tr>
                            <td>发货时间</td>
                            <td>{{$order->delivery_time ? date('Y-m-d H:i:s',$order->delivery_time) : '无'}}</td>
                        </tr>
                        <tr>
                            <td>快递费用</td>
                            <td>{{$order->delivery_money}}</td>
                        </tr>
                        <tr>
                            <td>快递类型</td>
                            <td>{{express_type_to_text($order->delivery_type)}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="layui-tab-item">

                    <table class="layui-table">
                        <tbody>
                        <tr>
                            <td>支付状态</td>
                            <td>{{pay_status_text($order->pay_status)}}</td>
                        </tr>
                        <tr>
                            <td>支付时间</td>
                            <td>{{$order->pay_time ? date('Y-m-d H:i:s',$order->pay_time) : '无'}}</td>
                        </tr>
                        <tr>
                            <td>支付方式</td>
                            <td>{{pay_type_to_text($order->pay_type)}}</td>
                        </tr>
                        <tr>
                            <td>支付流水</td>
                            <td>{{$order->out_trade_no}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            {{--<div class="hr-line"></div>
            <div class="layui-form-item text-center">
                <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
                <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
            </div>--}}
        </div>
    </form>
</div>

</body>
</html>
